package com.hpf.tool.entity;

/**
 * 分页查询实体
 * 
 * @author houbinfei
 *
 */
public class PagingEntity extends SearchEntity {
	private static final long serialVersionUID = -6356849168526569901L;

	/**
	 * 当前页数
	 */
	private long currentPage = 1;

	private long limit = 15;

	private long start = 0;

	/**
	 * @param currentPage
	 */
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	/**
	 * @author 侯斌飞
	 * @version 0.1 2015-07-01 09:22:17
	 * @return the start
	 */
	public Long getStart() {
		this.start = (this.currentPage - 1) * this.limit;
		return this.start;
	}

	/**
	 * @author 侯斌飞
	 * @version 0.1 2015-07-01 09:22:17
	 * @return the limit
	 */
	public long getLimit() {
		return limit;
	}

	/**
	 * @author 侯斌飞
	 * @version 0.1 2015-07-01 09:22:17
	 * @param limit
	 *            the limit to set
	 */
	public void setLimit(long limit) {
		this.limit = limit;
	}
}
